package com.stedu.mall.common.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    private Integer id;
    private String username; //账号
    @JsonIgnore
    private String password; //密码，MD5加密
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String payPassword; //支付密码
    @JsonIgnore
    private String salt; //盐
    private String realname; //真实姓名
    private String sex; //性别
    private String idCard; //身份证号
    private String phone; //电话
    private String email; //邮箱
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date regTime; //注册时间
    private BigDecimal money; //余额
    private Integer status; //0:未认证，1：已认证 2:禁用 3:注销

}
